package cn.homework03;

import java.util.Scanner;

public class TestGoods {
    public static void main(String[] args) {
        double dd =0;
        String[] goods = new String[]{"电风扇", "洗衣机", "电视机", "冰箱", "空调机"};
        double[] price = new double[]{124.23, 4500.0, 8800.9, 5000.88, 4456.0};
        Scanner input = new Scanner(System.in);
        Goods good = new Goods();
        good.login();
        System.out.println("**********欢迎进入商品批发城**********");
        System.out.println("\n\t编号\t商品\t价格\n");
        good.show();
        System.out.println("************************************");
        System.out.println("\n请输入您批发的商品编号");
        int b = input.nextInt();
        System.out.println("请输入批发数量：");
        int count = input.nextInt();
        switch (b) {
            case 1:
                dd = price[0] * count;
                break;
            case 2:
                dd = price[1] * count;
                break;
            case 3:
                dd= price[2] * count;
                break;
            case 4:
                dd = price[3] * count;
                break;
            case 5:
                dd= price[4] * count;
                break;
            default:
                break;
        }
        System.out.println("您需要付款："+good.change(dd));
    }
}